﻿namespace Digitalmes.Domain.Mes;

/// <summary>
/// 工艺参数
/// </summary>
[SugarTable("proc_process_params", "工艺参数表")]
public class ProcProcessParams : EntityBase
{
    /// <summary>
    /// 工序 Id
    /// </summary>
    [SugarColumn(ColumnDescription = "工序Id")]
    public long ProcessId { get; set; }

    /// <summary>
    /// 工序编号
    /// </summary>
    public string? ProcCode { get; set; }

    /// <summary>
    /// 产品 Id
    /// </summary>
    [SugarColumn(ColumnDescription = "产品Id")]
    public long ProductId { get; set; }

    /// <summary>
    /// 产品编号
    /// </summary>
    public string? ProductCode { get; set; }

    /// <summary>
    /// 标记名称。
    /// </summary>
    /// <remarks>值可重复，同一产品、工序下与 Step 组成唯一值。</remarks>
    [NotNull]
    public string? TagName { get; set; }

    /// <summary>
    /// 标记显示名称
    /// </summary>
    [NotNull]
    public string? TagDisplayName { get; set; }

    /// <summary>
    /// 步序号，0 表示没有。
    /// </summary>
    /// <remarks>
    /// 步序号针对于分组数组值进行拆解，此值是实际的编号，并不是数组的索引值。
    /// 步序号从 1 开始。
    /// </remarks>
    [SugarColumn(ColumnDescription = "步序号")]
    public int Step { get; set; }

    /// <summary>
    /// 上限值
    /// </summary>
    [SugarColumn(ColumnDescription = "标准上限值", Length = 10, DecimalDigits = 2)]
    public double StdHigher { get; set; }

    /// <summary>
    /// 下限值
    /// </summary>
    [SugarColumn(ColumnDescription = "标准下限值", Length = 10, DecimalDigits = 2)]
    public double StdLower { get; set; }

    /// <summary>
    /// 是否禁用
    /// </summary>
    public bool IsDisabled { get; set; }
}
